import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class PokerDeck {
	//heart, spade, club and diamond
	private static String[] suits = {"h","s","c","d"};
	//J,Q,K,A are represented as 11,12,13,14
	private static int[] values = {2,3,4,5,6,7,8,9,10,11,12,13,14};
	private List<Card> cards = new ArrayList<Card>();
	
	public PokerDeck() {
		for(int i = 0;i < this.suits.length; i++) {			
			for (int j = 0;j < this.values.length; j++) {				
				this.cards.add(new Card(this.suits[i], this.values[j]));
			}
		}
		Collections.shuffle(this.cards);
		
	}
	
	public Card deal() {
		Card card;		
		card = this.cards.get(0);
		this.cards.remove(0);		
		return card;
	}
}
